use crate::net::{data_package::DataPackage, tcp_client::TcpClient};

pub mod net_manager;
pub mod tcp_client;
pub mod head;
pub mod data_package;
pub mod tcp_server;

/// 网络事件
#[derive(Debug, Clone)]
pub enum NetEvent
{
	/// 接收数据
	RecvData(DataPackage),
	/// 断开连接
	Disconnected(TcpClient),
	/// 接收连接
	Accept(TcpClient),
	/// 停止监听
	StopListened,
	/// 监听失败
	ListenedFailed(String),
	/// 连接失败
	ConnectedFailed,
}